package com.beiing.tianshuai.tianshuai.mine.presenter;

import com.beiing.tianshuai.tianshuai.mine.entity.OrderUserAddressDataBean;
import com.beiing.tianshuai.tianshuai.mine.model.OrderAddressModel;
import com.beiing.tianshuai.tianshuai.mine.model.OrderAddressModelImpl;
import com.beiing.tianshuai.tianshuai.mine.model.OrderTransportModel;
import com.beiing.tianshuai.tianshuai.mine.model.OrderTransportModelImpl;
import com.beiing.tianshuai.tianshuai.mine.view.OrderAddressViewImpl;
import com.beiing.tianshuai.tianshuai.mine.view.OrderTransportViewImpl;

/**
 * Created by Administrator on 2018/4/10.
 */

public class OrderAddressPresenter implements OrderAddressPresenterImpl,OrderAddressModel.OrderUserAddressDataResponseListener{

    private OrderAddressViewImpl mView;
    private OrderAddressModelImpl mModel;

    public OrderAddressPresenter(OrderAddressViewImpl view) {
        mView = view;
        mModel = new OrderAddressModel(this);
    }
    @Override
    public void getUserAddress(String user_id) {
        mView.showProgress();
        mModel.getUserAddress(user_id);
    }

    @Override
    public void onGetDetailSuccess(OrderUserAddressDataBean bean) {
       //请求成功返回
        mView.hideProgress();
        mView.onRequestSuccess(bean);
    }

    @Override
    public void onGetDetailError(Throwable throwable) {

    }
}
